<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <link rel="stylesheet" type="text/js" href="/js/bootstrap.min.js">
    <link rel="stylesheet" href="/css/pintuer.css">
    <link rel="stylesheet" href="/css/admin.css">
    <script src="/js/jquery.js"></script>
    <script src="/js/pintuer.js"></script>
</head>
<body>
<div class="panel admin-panel">
  <div class="panel-head"><strong><span class="icon-pencil-square-o"></span>评估信息</strong></div>
  <div class="body-content">
    <form action="" enctype="multipart/form-data" method="post"  onsubmit="App_intro()" testform class="form-x" action="survey">
    <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>">

  <div class="form-inline" style="padding:20px 5px 5px 100px ">
  <div class="form-group">
  <div class="">
      <input type="hidden" class="input" name="car_id" value="{{$car_id}}"/>
    </div>
    </div>
    </div><br>
  <div class="form-inline" style="padding:20px 5px 5px 100px ">
  <div class="form-group">
  <div class="">
    <label>外观修复检查:</label><input type="text" class="input" name="wg_repair" id="aa" data-validate="number:必须为数字" placeholder="61项" onblur="Aa()"   />
    </div>
    </div>
  <div class="form-group" style="padding:20px 5px 5px 100px ">
  <div class="">
    <label>外观缺陷检查:</label><input type="text" class="input" name="wg_defect" id="aa" data-validate="number:必须为数字" placeholder="60项" onblur="Ab()"  /></div>
  </div>
  </div>

  <div class="form-inline" style="padding:20px 5px 5px 100px ">
  <div class="form-group">
  <div class="">
    <label>内饰缺陷检查:</label><input type="text" class="input" name="in_defect" id="ac" data-validate="number:必须为数字" placeholder="29项" onblur="Ac()"   /></div></div>
  <div class="form-group" style="padding:20px 5px 5px 102px ">
  <div class="">
    <label>指示灯检测 :  </label><input type="text" class="input" name="xt_light" id="ad" data-validate="number:必须为数字" placeholder="4项" onblur="Ad()"  /></div>
  </div>
  </div>


  <div class="form-inline" style="padding:20px 5px 5px 100px ">
  <div class="form-group">
  <div class="">
    <label>发动机检查:</label><input type="text" class="input" name="xt_engine" id="ae" data-validate="number:必须为数字" placeholder="35项" onblur="Ae()"  /></div></div>
  <div class="form-group" style="padding:20px 5px 5px 100px ">
  <div class="">
    <label>加速与行驶:</label><input type="text" class="input" name="js_driver" id="af" data-validate="number:必须为数字" placeholder="8项" onblur="Af()"  /></div>
  </div>
  </div>

  <div class="form-inline" style="padding:20px 5px 5px 100px ">
  <div class="form-group">
  <div class="">
    <label>减速与制动:</label><input type="text" class="input" name="js_brake" id="ag" data-validate="number:必须为数字" placeholder="4项" onblur="Ag()"   /></div></div>
  <div class="form-group" style="padding:20px 5px 5px 100px ">
  <div class="">
    <label>排除碰撞 :  </label><input type="text" class="input" name="ex_collision" id="ah" data-validate="number:必须为数字" placeholder="18项" onblur="Ah()"  /></div>
  </div>
  </div>

  <div class="form-inline" style="padding:20px 5px 5px 100px ">
  <div class="form-group">
  <div class="">
    <label>排除泡水 :  </label><input type="text" class="input" name="ex_water" id="ai" data-validate="number:必须为数字" placeholder="8项" onblur="Ai()"   /></div></div>
  <div class="form-group" style="padding:20px 5px 5px 100px ">
  <div class="">
    <label>排除火烧 : </label><input type="text" class="input" name="ex_fire" id="aj" data-validate="number:必须为数字" placeholder="2项" onblur="Aj() " /></div>
  </div>
  </div>

  <div class="form-inline" style="padding:20px 5px 5px 100px ">
  <div class="form-group">
  <div class="">
    <label>工具检测:</label><input type="text" class="input" name="xt_tool" id="ak" data-validate="number:必须为数字" placeholder="14项" onblur="Ak() " /></div></div>
  <div class="form-group" style="padding:20px 5px 5px 100px ">
  <div class="">
    <label>启动起步:</label><input type="text" class="input" name="js_start" id="al" data-validate="number:必须为数字" placeholder="5项" onblur="Al()" /></div>
  </div>
  </div>

    <div class="form-group">
      <div class="label">
        <label>首页图片:</label>
      </div>
      <div class="col-sm-2">
        <input type="file" name="index_img_path" />
      </div>
    </div>

  <div class="form-group">
    <div class="label">
      <label>其它图片</label>
    </div>
  </div>
  <div class="form-inline"  style="padding:20px 100px 10px 200px ">
  <div class="form-group">
  <div class="">
    <label>侧面:  </label><input  type="file" id="imaga" name="images[]" value="" /></div></div>
  <div class="form-group">
  <div class="">
    <label>车灯:  </label><input  type="file" id="imagb" name="images[]" value="" /></div></div>
  </div>

  <div class="form-inline" style="padding:20px 100px 10px 200px ">
  <div class="form-group">
  <div class="">
    <label>头部:  </label><input  type="file" id="imagc" name="images[]" value="" /></div></div>
  <div class="form-group">
  <div class="">
    <label>尾部:  </label><input  type="file" id="imagd"  name="images[]" value="" /></div></div>
  </div>

  <div class="form-inline" style="padding:20px 100px 20px 200px ">
  <div class="form-group">
  <div class="">
    <label>内部:   </label><input  type="file" id="image" name="images[]" value="" /></div></div>
  <div class="form-group">
  <div class="">
    <label>钥匙:   </label><input  type="file" id="imag"  name="images[]" value="" /></div></div>
  </div>


      <div class="form-group">
        <div class="label">
          <label>评估师说明：</label>
        </div>
        <div class="field">
          <textarea name="app_intro" id="app_intro" class="input" style="height:120px;" ></textarea>
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label></label>
        </div>
        <div class="field">
          <button class="button bg-main icon-check-square-o" type="submit"> 提交</button>
        </div>
      </div>
    </form>
  </div>
</div>
</body>
<script type="text/javascript">
    var inp = document.getElementsByTagName("form");


    function App_intro(){
    var num = document.getElementById('app_intro');
    var imag = document.getElementById('imag');
    var imaga = document.getElementById('imaga');
    var imagb = document.getElementById('imagb');
    var imagc = document.getElementById('imagc');
    var imagd = document.getElementById('imagd');
    var image = document.getElementById('image');
     if(imag.value == ""){
        alert("请添加图片");
        return  top.location = "survey";
      }
      if(num.value == ""){
       alert("请添加评车说明");
       return top.location = "survey";
      }
      if(imaga.value == ""){
       alert("请添加评车说明");
       return top.location = "survey";
      }
      if(imagb.value == ""){
       alert("请添加评车说明");
       return top.location = "survey";
      }
      if(imagc.value == ""){
       alert("请添加评车说明");
       return top.location = "survey";
      }
      if(imagd.value == ""){
       alert("请添加评车说明");
       return top.location = "survey";
      }
      if(image.value == ""){
       alert("请添加评车说明");
       return top.location = "survey";
      }
    }

    function Aa(){
    var num = document.getElementById('aa');
    var zhi = num.value;
     if(zhi >= 0 && zhi <= 61){
        return true;
     }else{
       zhi = "";
       num.value = zhi;
       alert("数字输入不再范围，请重新输入");
     }
    }
    function Ab(){
    var num = document.getElementById('ab');
    var zhi = num.value;
     if(zhi >= 0 && zhi <= 60){
        return true;
     }else{
       zhi = "";
       num.value = zhi;
       alert("数字输入不再范围，请重新输入");
     }
    }
    function Ac(){
    var num = document.getElementById('ac');
    var zhi = num.value;
     if(zhi >= 0 && zhi <= 29){
        return true;
     }else{
       zhi = "";
       num.value = zhi;
       alert("数字输入不再范围，请重新输入");
     }
    }
    function Ad(){
    var num = document.getElementById('ad');
    var zhi = num.value;
     if(zhi >= 0 && zhi <= 4){
        return true;
     }else{
       zhi = "";
       num.value = zhi;
       alert("数字输入不再范围，请重新输入");
     }
    }
    function Ae(){
      //alert("成功一小步");
    var num = document.getElementById('ae');
    var zhi = num.value;
     if(zhi >= 0 && zhi <= 35){
        return true;
     }else{
       zhi = "";
       num.value = zhi;
       alert("数字输入不再范围，请重新输入");
     }
    }
    function Af(){
      //alert("成功一小步");
    var num = document.getElementById('af');
    var zhi = num.value;
     if(zhi >= 0 && zhi <= 8){
        return true;
     }else{
       zhi = "";
       num.value = zhi;
       alert("数字输入不再范围，请重新输入");
     }
    }
    function Ag(){
      //alert("成功一小步");
    var num = document.getElementById('ag');
    var zhi = num.value;
     if(zhi >= 0 && zhi <= 4){
        return true;
     }else{
       zhi = "";
       num.value = zhi;
       alert("数字输入不再范围，请重新输入");
     }
    }
    function Ah(){
      //alert("成功一小步");
    var num = document.getElementById('ah');
    var zhi = num.value;
     if(zhi >= 0 && zhi <= 18){
        return true;
     }else{
       zhi = "";
       num.value = zhi;
       alert("数字输入不再范围，请重新输入");
     }
    }
    function Ai(){
      //alert("成功一小步");
    var num = document.getElementById('ai');
    var zhi = num.value;
     if(zhi >= 0 && zhi <= 8){
        return true;
     }else{
       zhi = "";
       num.value = zhi;
       alert("数字输入不再范围，请重新输入");
     }
   }
    function Aj(){
      //alert("成功一小步");
    var num = document.getElementById('aj');
    var zhi = num.value;
     if(zhi >= 0 && zhi <= 2){
        return true;
     }else{
       zhi = "";
       num.value = zhi;
       alert("数字输入不再范围，请重新输入");
     }
    }
    function Ak(){
      //alert("成功一小步");
    var num = document.getElementById('ak');
    var zhi = num.value;
     if(zhi >= 0 && zhi <= 14){
        return true;
     }else{
       zhi = "";
       num.value = zhi;
       alert("数字输入不再范围，请重新输入");
     }
   }
    function Al(){
      //alert("成功一小步");
    var num = document.getElementById('al');
    var zhi = num.value;
     if(zhi >= 0 && zhi <= 5){
        return true;
     }else{
       zhi = "";
       num.value = zhi;
       alert("数字输入不再范围，请重新输入");
     }
    }


</script>
</html>
